@import '../theme.less';

.lu-upload {
  position: relative;
  border: 1px dashed @border-color-base;
  width: 64px;
  height: 64px;
  cursor: pointer;
  transition: all ease-in-out 0.3s;
  overflow: hidden;
  &::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 35%;
    height: 2px;
    transform: translate(-50%, -50%);
    background-color: @border-color-base;
    transition: all ease-in-out 0.3s;
  }
  &::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 35%;
    transform: translate(-50%, -50%);
    background-color: @border-color-base;
    transition: all ease-in-out 0.3s;
  }
  &:hover {
    border-color: @primary-color;
    &::before {
      background-color: @primary-color;
    }
    &::after {
      background-color: @primary-color;
    }
  }
}

.lu-divider {
  padding: 12px 0;
}
.lu-divider-line {
  height: 0;
  border-top: 1px solid @border-color-base;
}
.lu-navgrid {
  display: flex;
  flex-wrap: wrap;
  min-height: 52px;
  background-color: #fff;
}
.lu-navgrid-item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px 0;
  line-height: 1;
}
.lu-navgrid-item-title {
  font-size: 13px;
  color: #333;
  text-align: center;
}
.lu-navgrid-item-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
}
.lu-textarea {
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-all;
  text-align: justify;
  background-color: #fff;
}
.lu-richtext {
  word-break: break-all;
}
.lu-navgrid-empty {
  padding: 16px;
}
.lu-cube {
  display: grid;
}
.lu-cube-grid {
  position: relative;
  .lu-cube-grid-content {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    img {
      width: 100%;
      height: 100%;
    }
  }
  &::before {
    content: '';
    padding-bottom: 100%;
    display: block;
  }
}

.lu-search {
  position: relative;
  padding: 7px 15px;
  background-color: #fff;
  .lu-search-icon {
    width: 16px;
    height: 16px;
  }
  .lu-search-placeholder {
    color: #999;
    font-size: 14px;
    margin-left: 8px;
  }
  .lu-search-pre {
    display: flex;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(30px, -50%);
  }
  .lu-search-input {
    height: 30px;
    width: 100%;
    outline: none;
    border: none;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.05);
  }
}
.lu-richtext {
  p {
    margin: 0;
    padding: 0;
  }
}
.lu-goods-small {
  display: flex;
  flex-wrap: wrap;
  padding: 16px 8px 0 8px;
  .lu-goods-item {
    margin: 0 8px 16px 8px;
    width: calc(50% - 16px);
  }
  .lu-goods-detail {
    background-color: #fff;
    padding: 12px;
  }
  .lu-goods-cover {
    position: relative;
    &::before {
      content: '';
      display: block;
      padding-top: 100%;
    }
    img {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }
  .lu-goods-title {
    height: 2.8em;
    line-height: 1.4em;
    margin-bottom: 12px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2;
  }
  .lu-goods-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .lu-goods-price {
    display: flex;
    color: #f22424;
    font-size: 15px;
  }
  .lu-goods-buy {
    display: inline-block;
    padding: 6px 1em;
    font-size: 12px;
    line-height: 1;
    border: 1px solid #f22424;
    border-radius: 12px;
    color: #f22424;
  }
}
.lu-goods-large {
  display: flex;
  flex-wrap: wrap;
  padding: 16px 16px 0 16px;
  .lu-goods-item {
    width: 100%;
    margin-bottom: 16px;
  }
  .lu-goods-cover {
    position: relative;
    &::before {
      content: '';
      display: block;
      padding-top: 100%;
    }
    img {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
  }
  .lu-goods-detail {
    background-color: #fff;
    padding: 18px 12px;
  }
  .lu-goods-title {
    line-height: 1.4em;
    margin-bottom: 12px;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 2;
  }
  .lu-goods-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .lu-goods-price {
    display: flex;
    color: #f22424;
    font-size: 16px;
  }
  .lu-goods-buy {
    display: inline-block;
    padding: 8px 2em;
    font-size: 12px;
    line-height: 1;
    border: 1px solid #f22424;
    border-radius: 14px;
    color: #f22424;
  }
}
.lu-categories {
  .lu-categories-scroll {
    height: 50px;
    overflow: -moz-scrollbars-none;
    overflow-x: scroll;
    -ms-overflow-style: none;
    &::-webkit-scrollbar {
      width: 0 !important;
      height: 0 !important;
    }
  }
  .lu-categories-content {
    display: flex;
    align-items: center;
    height: 100%;
  }
  .lu-categories-item {
    position: relative;
    min-width: 100px;
    text-align: center;
    font-size: 14px;
    line-height: 1;
    color: #666;
    z-index: 2;
  }
  .lu-categories-item-active {
    color: #333;
    font-size: 18px;
    font-weight: bold;
    &::after {
      content: '';
      position: absolute;
      left: 50%;
      bottom: 0;
      width: 50%;
      height: 6px;
      border-radius: 3px;
      transform: translate(-50%, 4px);
      background-color: #f22424;
      z-index: -1;
    }
  }
}
.lu-fab {
  width: 50px;
  height: 50px;
  img {
    width: 100%;
    height: 100%;
  }
}